package com.mes.biz.domain;

import javax.validation.Valid;
import java.math.BigDecimal;
import javax.validation.constraints.NotBlank;
import lombok.Data;
import com.mes.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mes.common.utils.log.annotation.FieldRemark;
import com.mes.common.utils.log.annotation.LogField;
import com.mes.common.annotation.Excel;

/**
 * 销售单物料对象 biz_order_material
 * @author wy
 * @email wy
 * @date 2023-06-20
 */
@Data
public class BizOrderMaterial extends BaseEntity<BizOrderMaterial>
{
    private static final long serialVersionUID = 1L;

    /** 产品 */
    @Excel(name = "产品")
    @NotBlank(message = "产品不允许为空")
    @LogField
    @FieldRemark(name = "产品",field = "productId")
    private String productId;

    /** 销售单 */
    @Excel(name = "销售单")
    @NotBlank(message = "销售单不允许为空")
    @LogField
    @FieldRemark(name = "销售单",field = "orderId")
    private String orderId;

    /** 数量 */
    @Excel(name = "数量")
    @LogField
    @FieldRemark(name = "数量",field = "number")
    private BigDecimal number;

    /** 租户id */
    @Excel(name = "租户id")
    @NotBlank(message = "租户id不允许为空")
    @LogField
    @FieldRemark(name = "租户id",field = "tenantId")
    private String tenantId;

    /** 已领数量 */
    @Excel(name = "已领数量")
    @LogField
    @FieldRemark(name = "已领数量",field = "receivedNumber")
    private BigDecimal receivedNumber;

    @FieldRemark(name = "领取类型 1-已存在物料 2-新增物料 3-删除物料",field = "getStatus")
    private String gainStatus;

    @FieldRemark(name = "产品编号",field = "productCode")
    private String productCode;

    @FieldRemark(name = "型号",field = "model")
    private String model;

    @FieldRemark(name = "品牌",field = "brand")
    private String brand;

    @FieldRemark(name = "颜色",field = "color")
    private String color;

    @FieldRemark(name = "规格",field = "spec")
    private String spec;

    @FieldRemark(name = "本次领取数量",field = "gainNumber")
    private BigDecimal gainNumber;

    /** 仓位 */
    @Excel(name = "仓位")
    private String spaceId;
    @FieldRemark(name = "仓位",field = "spaceName")
    private String spaceName;

    /** 默认仓库 */
    @Excel(name = "默认仓库")
    private String warehouseId;
    @FieldRemark(name = "默认仓库",field = "warehouseName")
    private String warehouseName;

    @FieldRemark(name = "领取状态 0-未领 1-已经领取",field = "receviedStatus")
    private String receviedStatus;

    @FieldRemark(name = "金额",field = "amount")
    private BigDecimal amount;
    @FieldRemark(name = "物料类型  0-物料 1-补料 2-退料",field = "productType")
    private String productType;
    @FieldRemark(name = "自定义",field = "custom")
    private String custom;

    private BigDecimal number3;
    private BigDecimal number4;
    private BigDecimal convertRatioA;
    private BigDecimal convertRatioB;
    private BigDecimal stock;
    private int sort;
    private String startDate;
    private String endDate;
    private String unit;
    private String unitName;
}
